01. Introduction to Modules

Introduction to Modules

ND079 JPND C3 L3 A01 Introduction To Java Modules

Project Jigsaw

Our dependency examples have been simple, but libraries that use other libraries eventually create a very complex dependency chain. Project Jigsaw was the effort to declare dependency relationships in a way that would allow Java to recognize library dependencies and control package-level visibility based on those dependencies. Eventually, the changes implemented by Project Jigsaw were merged into Java 9 and became the Module system.

Benefits of Modules

Benefits of Modules

Benefits of controlling package visibility and dependency relationship at compile time:

  • Easier for developers to maintain libraries and large applications
  • Improve the security of the JDK by limiting which packages were exposed
  • Improve application performance by reducing the size and surface area of java components
  • Enable the JDK to better scale for use in small devices and cloud deployments